﻿// Decompiled with JetBrains decompiler
// Type: Netick.CodeGen.ICodeGenUser
// Assembly: Netick.CodeGen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 95965C71-875F-44B8-BA79-93A19C7D6A17
// Assembly location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Editor\Netick.CodeGen.dll

using Mono.Cecil;

#nullable disable
namespace Netick.CodeGen;

public interface ICodeGenUser
{
  void Init(ModuleDefinition typeDefinition);

  void Log(object message);

  void LogWarning(object message);

  void LogError(object message);

  void OnPropertyFinishProcessing(PropertyDefinition property, FieldReference backFieldResolved);

  void OnArrayFinishProcessing(FieldDefinition arrayField);

  bool IsPropertyCompressable(TypeDefinition property, float precision);

  bool IsPropertyAutoSmoothable(PropertyDefinition property);

  void HandleAutoSmoothablePropertyGetter(
    MethodDefinition getMeth,
    PropertyDefinition item,
    TypeDefinition typeDefinition,
    MethodReference ptr,
    int offsetInWords,
    float precision,
    FieldDefinition interpolator,
    InterpolationSource interpolationSource);

  void AddAutoSmoothableInitInstructions(
    MethodDefinition initMethod,
    PropertyDefinition property,
    FieldDefinition interpolator);

  int GetAutoSmoothableVectorFloatFieldsCount(PropertyDefinition item);

  void OverrideStructCompressedPropertyGetter(
    TypeDefinition typeDefinition,
    MethodDefinition method,
    PropertyDefinition property,
    FieldDefinition backedField,
    float precision);

  void OverrideStructCompressedPropertySetter(
    TypeDefinition typeDefinition,
    MethodDefinition method,
    PropertyDefinition property,
    FieldDefinition backedField,
    float inversePrecision);

  void OverrideCompressablePropertyGetter(
    MethodDefinition getMeth,
    PropertyDefinition item,
    FieldReference backField,
    TypeDefinition typeDefinition,
    MethodReference ptr,
    int offsetInWords,
    float precision,
    bool ensureSafety);

  void OverrideCompressablePropertySetter(
    MethodDefinition setMeth,
    PropertyDefinition item,
    FieldReference backingField,
    TypeDefinition typeDefinition,
    MethodReference ptr,
    MethodReference dirtfy,
    int offsetInWords,
    int sizeInWords,
    int is64,
    bool hasOnChanged,
    float precision);

  string GetNetworkScriptTypeFullName();
}
